import 'package:flutter_hx/pages/me_auction/me_auction_view.dart';
import 'package:flutter_hx/pages/me_check_in/me_check_in_binding.dart';
import 'package:flutter_hx/pages/me_check_in/me_check_in_view.dart';
import 'package:flutter_hx/pages/goods/goods_detail_view.dart';
import 'package:flutter_hx/pages/order/submit/order_submit_binding.dart';
import 'package:flutter_hx/pages/order/submit/order_submit_view.dart';
import 'package:flutter_hx/pages/setting/pay_password/pay_password_binding.dart';
import 'package:flutter_hx/pages/setting/pay_password/pay_password_view.dart';
import 'package:get/get.dart';

import '../pages/account/account_binding.dart';
import '../pages/account/account_view.dart';
import '../pages/address/address_edit/address_edit_binding.dart';
import '../pages/address/address_edit/address_edit_view.dart';
import '../pages/address/address_list/address_list_binding.dart';
import '../pages/address/address_list/address_list_view.dart';
import '../pages/category/category_binding.dart';
import '../pages/category/category_view.dart';
import '../pages/goods/goods_detail_binding.dart';
import '../pages/login/login_binding.dart';
import '../pages/login/login_view.dart';
import '../pages/me_team/me_team_binding.dart';
import '../pages/me_team/me_team_view.dart';
import '../pages/order/order_binding.dart';
import '../pages/order/order_info/order_info_binding.dart';
import '../pages/order/order_info/order_info_view.dart';
import '../pages/order/order_view.dart';
import '../pages/root/cart/cart_binding.dart';
import '../pages/root/cart/cart_view.dart';
import '../pages/root/home/home_binding.dart';
import '../pages/root/home/home_view.dart';
import '../pages/root/me/me_binding.dart';
import '../pages/root/me/me_view.dart';
import '../pages/root/pm/pm_binding.dart';
import '../pages/root/pm/pm_view.dart';
import '../pages/root/root_binding.dart';
import '../pages/root/root_view.dart';
import '../pages/root/share/share_binding.dart';
import '../pages/root/share/share_view.dart';
import '../pages/setting/setting_binding.dart';
import '../pages/setting/setting_view.dart';

part 'app_routes.dart';

class AppPages {
  AppPages._();

  static const initial = "/";

  static final routes = [
    GetPage(
        name: '/',
        page: () => const RootView(),
        bindings: [RootBinding()],
        participatesInRootNavigator: true,
        preventDuplicates: true,
        children: [
          GetPage(
            name: Routes.home,
            page: () => const HomePage(),
            bindings: [
              HomeBinding(),
            ],
          ),
          GetPage(
            name: Routes.homePm,
            page: () => const PmPage(),
            bindings: [
              PmBinding(),
            ],
          ),
          GetPage(
            name: Routes.homeCart,
            page: () => const CartPage(),
            bindings: [
              CartBinding(),
            ],
          ),
          GetPage(
            name: Routes.homeMe,
            page: () => const MePage(),
            bindings: [
              MeBinding(),
            ],
          )
        ]),
    GetPage(
      name: _Paths.login,
      page: () => const LoginPage(),
      bindings: [
        LoginBinding(),
      ],
    ),
    GetPage(
      name: _Paths.account,
      page: () => const AccountPage(),
      bindings: [
        AccountBinding(),
      ],
    ),
    GetPage(
      name: _Paths.meTeam,
      page: () => const MeTeamPage(),
      bindings: [
        MeTeamBinding(),
      ],
    ),
    GetPage(
      name: _Paths.share,
      page: () => const SharePage(),
      bindings: [
        ShareBinding(),
      ],
    ),
    GetPage(
      name: _Paths.auction,
      page: () => MeAuctionPage(),
    ),
    GetPage(
      name: _Paths.addressList,
      page: () => const AddressListPage(),
      bindings: [
        AddressListBinding(),
      ],
    ),
    GetPage(
      name: _Paths.addressEdit,
      page: () => const AddressEditPage(),
      bindings: [
        AddressEditBinding(),
      ],
    ),
    GetPage(
      name: _Paths.order,
      page: () => const OrderPage(),
      bindings: [
        OrderBinding(),
      ],
    ),
    GetPage(
      name: _Paths.orderInfo,
      page: () => const OrderInfoPage(),
      bindings: [
        OrderInfoBinding(),
      ],
    ),
    GetPage(
      name: _Paths.setting,
      page: () => const SettingPage(),
      bindings: [
        SettingBinding(),
      ],
    ),
    GetPage(
      name: _Paths.goodsDetail,
      page: () => const GoodsDetailsPage(),
      bindings: [
        GoodsDetailBinding(),
      ],
    ),
    GetPage(
        name: _Paths.payPassword,
        page: () => const PayPasswordPage(),
        bindings: [PayPasswordBinding()]),
    GetPage(
        name: _Paths.checkIn,
        page: () => const MeCheckInPage(),
        bindings: [MeCheckInBinding()]),
    GetPage(
      name: _Paths.homeCategory,
      page: () => const CategoryPage(),
      bindings: [
        CategoryBinding(),
      ],
    ),
    GetPage(
      name: _Paths.submitOrder,
      page: () => const OrderSubmitPage(),
      bindings: [
        OrderSubmitBinding(),
      ],
    ),
  ];
}
